Skip to content

[AI Infra] Chat Experience: make Agent default in Elasticsearch Serverless and Solution view#246303

Merged
KodeRad merged 4 commits intoelastic:mainfrom
KodeRad:ml-agent-builder-default-search-serverless
Dec 16, 2025
Merged

[AI Infra] Chat Experience: make Agent default in Elasticsearch Serverless and Solution view#246303
KodeRad merged 4 commits intoelastic:mainfrom
KodeRad:ml-agent-builder-default-search-serverless

Conversation

@KodeRad
Copy link
Copy Markdown
Contributor

@KodeRad KodeRad commented Dec 15, 2025

Summary

Implements: https://github.com/elastic/ml-team/issues/1755
Follow up to: #244532

The goal of this PR is to make Chat Experience in Elasticsearch serverless/solution view default to Agent instead of Classic Assistants.

Implementation details:

  • Serverless is configured via serverless.es.yml file
  • Second argument in coreStart.settings.client.get$<AIChatExperience> was removed as it was overriding provided configuration.

Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

  • Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support
  • Documentation was added for features that require explanation or tutorials
  • Unit or functional tests were updated or added to match the most common scenarios
  • If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the docker list
  • This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The release_note:breaking label should be applied in these situations.
  • Flaky Test Runner was used on any tests changed
  • The PR description includes the appropriate Release Notes section, and the correct release_note:* label is applied per the guidelines
  • Review the backport guidelines and apply applicable backport:* labels.

Identify risks

Does this PR introduce any risks? For example, consider risks like hard to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified risk. Invite stakeholders and evaluate how to proceed before merging.

@KodeRad KodeRad self-assigned this Dec 15, 2025
@KodeRad KodeRad added release_note:enhancement :ml backport:skip This PR does not require backporting Team:ML Team label for ML (also use :ml) t// Team:AI Infra Platform AppEx AI Infrastructure Team t// labels Dec 15, 2025
@KodeRad KodeRad requested a review from rbrtj December 15, 2025 08:08
@KodeRad KodeRad marked this pull request as ready for review December 15, 2025 08:19
@KodeRad KodeRad requested review from a team as code owners December 15, 2025 08:19
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/ml-ui (:ml)

@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/appex-ai-infra (Team:AI Infra)

if (request) {
try {
const [, startServices] = await core.getStartServices();
const spaces = (startServices as { spaces?: SpacesPluginStart }).spaces;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can get rid of this type assertion by properly typing AIAssistantManagementSelectionPluginServerDependenciesStart in src/platform/plugins/shared/ai_assistant_management/selection/server/types.ts

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. That's definitely an improvement! Fixed here b0792c8

@botelastic botelastic Bot added the ci:project-deploy-observability Create an Observability project label Dec 15, 2025
@github-actions
Copy link
Copy Markdown
Contributor

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

@KodeRad KodeRad added the v9.3.0 label Dec 15, 2025
Copy link
Copy Markdown
Contributor

@e40pud e40pud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Security GenAI code LGTM

@KodeRad KodeRad requested a review from rbrtj December 15, 2025 10:19
Comment thread config/serverless.yml Outdated
Comment on lines +301 to +303
# AI Assistant Management Selection plugin
aiAssistantManagementSelection.preferredChatExperience: 'classic'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIUC this configuration is unnecessary as this is already the default value for the setting.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked that and it's indeed redundant. Fixed here 0d42f63

@joemcelroy
Copy link
Copy Markdown
Member

could you remove this label please? (default) This can be done everywhere.
Screenshot 2025-12-15 at 10 28 11

@KodeRad
Copy link
Copy Markdown
Contributor Author

KodeRad commented Dec 15, 2025

@joemcelroy

could you remove this label please? (default) This can be done everywhere.

It is part of a separate PR

@SiddharthMantri SiddharthMantri self-requested a review December 15, 2025 11:22
@KodeRad KodeRad requested a review from gsoldevila December 15, 2025 11:31
@KodeRad KodeRad changed the title [AI Infra] Chat Experience: make Agent default in Search Serverless and Solution view [AI Infra] Chat Experience: make Agent default in Elasticsearch Serverless and Solution view Dec 15, 2025
Copy link
Copy Markdown
Member

@gsoldevila gsoldevila left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Core changes LGTM!

Copy link
Copy Markdown
Contributor

@rbrtj rbrtj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 💯

@elasticmachine
Copy link
Copy Markdown
Contributor

⏳ Build in-progress

  • Buildkite Build
  • Commit: e08e4d9
  • Kibana Serverless Image: docker.elastic.co/kibana-ci/kibana-serverless:pr-246303-e08e4d93942c

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #100 / Endpoint plugin @ess @serverless @skipInServerlessMKI Endpoint artifacts (via lists plugin): Trusted Applications "before all" hook in "@ess @serverless @skipInServerlessMKI Endpoint artifacts (via lists plugin): Trusted Applications"

History

cc @KodeRad

try {
const [coreStart, startServices] = await core.getStartServices();
// Avoid security exceptions before login
const user = coreStart.security.authc.getCurrentUser(request);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could also use request.auth.isAuthenticated rather than fetching the user.
I don't know which approach is preferred.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's good catch! I will address that in following PR

Copy link
Copy Markdown
Member

@jgowdyelastic jgowdyelastic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a minor comment about not really needing to fetch the user.
but otherwise LGTM

@KodeRad KodeRad merged commit 3c6be51 into elastic:main Dec 16, 2025
13 checks passed
@peteharverson peteharverson added release_note:skip Skip the PR/issue when compiling release notes and removed release_note:enhancement labels Dec 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting ci:project-deploy-observability Create an Observability project :ml release_note:skip Skip the PR/issue when compiling release notes Team:AI Infra Platform AppEx AI Infrastructure Team t// Team:ML Team label for ML (also use :ml) t// v9.3.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.